package hey.dylan.controller;

import hey.dylan.model.ResponseResult;
import hey.dylan.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MenuController {

    @Autowired
    private MenuService menuService;

    @GetMapping("/menu/getMenuInfo")
    @PreAuthorize("@av.hasAuthority('system:dept:list')")
    public ResponseResult getMenuInfo(){

        return new ResponseResult(200,"你的菜单已生成",menuService.getMenuInfoById());

    }

}
